#!/bin/bash

#profile=$1
#
#modules=(cn-center)
#
#for module in ${modules[@]};
#do
#  printf "install the module {%s}" "{$module}"
#  helm install  -f  ../helm/${module}/config-${profile}.yaml  --name ${module}  ../helm/${module}
#done

#!/bin/bash
date "+%Y-%m-%d %H:%M:%S"
tag_time=$(date -d $3 +'%Y%m%d%H%M%S')
if [ $1 == start ] && [ $2 == all ]
then
sleep 5;
echo "start deploy cn-config-server"
ansible-playbook --extra-vars "profile=prod module=cn-config-server time=$tag_time" ./deploy-task.yml
echo "cn-config-server deploy finished"
sleep 60;
#echo "start deploy cn-gateway"
#ansible-playbook --extra-vars "profile=prod module=cn-gateway time=$tag_time" ./deploy-task.yml
#echo "cn-gateway deploy finished"
#sleep 5;
#echo "start deploy cn-auth"
#ansible-playbook --extra-vars "profile=prod module=cn-auth time=$tag_time" ./deploy-task.yml
#echo "cn-auth deploy finished"
fi
